package com.chaopei.base2;

/**
 * @Author Corday 天涯
 * @Date 2022/3/5 15:07
 */
public class BaseAlgo {
    public static void main(String[] args) {
        play();
    }//main

    public static void play() {
        int[] arr = {12, 10, 11,5, 53, 9, 15, 18, 5};
        int max, min;
        max = min = arr[0];
        for(int i=0;i<arr.length;i++){
                if(max<arr[i]){
                    max=arr[i];
                }else if(min>arr[i]){
                    min = arr[i];
                }
        }
        System.out.println("max="+max);
        System.out.println("min="+min);
    }
}
